        <div class="maby_love_goods">
        	<span class="maby_love_label">您可能会感兴趣的商品</span>
            <div class="love_goods_wrap">
            	<ul class="love_prot_list">
            <?php foreach(PSP_FIELDLIST_DATA_DEFAULT as $_key => $_value ){ ?>
            <?php if ($_value['icon1']) { ?>				
                	<li>
                    	<div class="prot_img">
                        	<a href="<?php echo $_value['icon1'];?>"><img src="<?php echo $_value['icon2'];?>" alt="" /></a>
                        </div>
                        <div class="title"><a href="<?php echo $_value['icon1'];?>"><?php echo $_value['icon3'];?></a></div>
                        <div class="attribute"><span>零售价：</span><span>￥<?php echo $_value['icon4'];?></span></div>
                        <div class="attribute"><span>爱搜价：</span><span><?php if (isset($this->controller->my->id)) { ?>￥<?php echo $_value['icon5'];?><?php }else{ ?>会员可见<?php } ?></span></div>
                        <!--<div class="attribute vip"><span><img src="images/vip1.jpg" />：</span><span class="vipPrice1">￥40.00</span></div>-->
                        <div class="attribute"><span>库存：</span><span><?php echo $_value['icon6'];?>件</span></div>
						<div class="attribute attribute1">
                        	<span>数量：</span><a class="cutOrder" href="#"><img src="<?php echo $this->_webroot('images/cutNum.jpg'); ?>" /></a>
							<input type="text" class="orderNum"  id="num<?php echo $_value['icon1'];?>" name="num<?php echo $_value['icon1'];?>"  value="1" />
							<a class="addOrder" href="#"><img src="<?php echo $this->_webroot('images/addNum.jpg'); ?>" /></a>
                        </div>
						<input type="hidden" value="<?php echo $_value['icon7'];?>" id="shop_id<?php echo $_value['icon1'];?>" name="shop_id<?php echo $_value['icon1'];?>" />		
                        <input type="button" class="orderBtn" value="" onclick="javascript:addCart(<?php echo $_value['icon1'];?>);" />
                    </li>
            <?php } ?> 				
            <?php } ?>						
                	<div class="clear"></div>            	
            	</ul>
            </div>
        </div>
            <input type="hidden" value="<?php echo  $this->controller->my->id;?>" id="shop_user" />			
<script language="JavaScript" src="<?php echo $this->_webroot('servtools/ajax_client/ajax.js');?>"></script>
<script language="JavaScript">
	<!--
		function addCart(id) {
			var num = document.getElementById('num'+id);
			var shop_id = document.getElementById('shop_id'+id).value;
			var user_id = document.getElementById('shop_user').value;
			
			var num_reg = /^(\d+)$/;
			if(!num_reg.test(num.value)){
				alert('购买数量格式不正确!');
				return;
			}
			if(num.value=='0'){
				alert('购买数量不能为0！');
				return;
			}

			if (shop_id == user_id){
				alert('自己的商品不能放入购物车');
			}else{
				ajax("<?php echo $this->_url('shop/goodsaddcart');?>","POST","id="+id+"&num="+num.value,function(data){
					if(data == 1) {
						alert("已成功添加到您的购物车！");
					} else if(data == -1) {
						alert("此商品已在您的购物车里！");
					} else if(data == -2) {
						alert("库存里没有这么多商品！");
					} else {
						alert("添加失败，请确认您是否已登陆！");
					}
				});
			}
		}
	-->	
</script>			